package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.DictCityMapper;
import com.ruoyi.system.domain.DictCity;
import com.ruoyi.system.service.IDictCityService;
import com.ruoyi.common.core.text.Convert;

/**
 * 省市区编码Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-01-12
 */
@Service
public class DictCityServiceImpl implements IDictCityService 
{
    @Autowired
    private DictCityMapper dictCityMapper;

    /**
     * 查询省市区编码
     * 
     * @param id 省市区编码主键
     * @return 省市区编码
     */
    @Override
    public DictCity selectDictCityById(String id)
    {
        return dictCityMapper.selectDictCityById(id);
    }

    /**
     * 查询省市区编码列表
     * 
     * @param dictCity 省市区编码
     * @return 省市区编码
     */
    @Override
    public List<DictCity> selectDictCityList(DictCity dictCity)
    {
        return dictCityMapper.selectDictCityList(dictCity);
    }

    /**
     * 新增省市区编码
     * 
     * @param dictCity 省市区编码
     * @return 结果
     */
    @Override
    public int insertDictCity(DictCity dictCity)
    {
        return dictCityMapper.insertDictCity(dictCity);
    }

    /**
     * 修改省市区编码
     * 
     * @param dictCity 省市区编码
     * @return 结果
     */
    @Override
    public int updateDictCity(DictCity dictCity)
    {
        return dictCityMapper.updateDictCity(dictCity);
    }

    /**
     * 批量删除省市区编码
     * 
     * @param ids 需要删除的省市区编码主键
     * @return 结果
     */
    @Override
    public int deleteDictCityByIds(String ids)
    {
        return dictCityMapper.deleteDictCityByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除省市区编码信息
     * 
     * @param id 省市区编码主键
     * @return 结果
     */
    @Override
    public int deleteDictCityById(String id)
    {
        return dictCityMapper.deleteDictCityById(id);
    }
}
